package com.hfut.jpoa.service;

import java.util.List;

import com.hfut.jpoa.common.dto.ResultDto;
import com.hfut.jpoa.dto.CustomerDTO;
import com.hfut.jpoa.dto.DispatchDTO;
import com.hfut.jpoa.dto.SysparaDTO;
import com.hfut.jpoa.model.Customer;
import com.hfut.jpoa.model.Dispatch;
import com.hfut.jpoa.model.Syspara;
import com.hfut.jpoa.model.User;
import com.hfut.jpoa.service.exception.DispatchException;
import com.hfut.jpoa.service.exception.SysparaException;

public interface DispatchService
{
	/**
	 * 
	 * 根据条件查询页面列表
	 * 
	 * @param condition
	 * @return
	 * @throws SysparaException
	 */
	public ResultDto<Dispatch> queryInfoForPage(DispatchDTO condition)
	        throws DispatchException;

	/**
	 * 插入新纪录
	 * 
	 * @param condition
	 * @throws DispatchException
	 */
	public void insert(Dispatch condition) throws DispatchException;

	/**
	 * 
	 * 编辑记录
	 * 
	 * @param record
	 * @throws DispatchException
	 */
	public void update(Dispatch record) throws DispatchException;

	/**
	 * 查询详情
	 * 
	 * @param syspara
	 * @return
	 * @throws SysparaException
	 */
	public Dispatch findInfo(Dispatch condition) throws DispatchException;

	/**
	 * 验证编码是否已经被使用
	 * 
	 * @param condition
	 * @return 存在返回true，失败返回false
	 * @throws DispatchException
	 */
	public boolean codeValidator(Dispatch condition) throws DispatchException;

	/**
	 * 查询列表
	 * 
	 * @param config
	 * @return
	 * @throws SysparaException
	 */
	public List<Dispatch> queryList(Dispatch condition)
	        throws DispatchException;

	/**
	 * 保存报修信息
	 * 
	 * @param dispatch
	 * @throws SysparaException
	 */
	public void saveDispatch(Dispatch dispatch) throws DispatchException;

	/**
	 * 对用户ID进行转换
	 * 
	 * @param result
	 * @param lstUsers
	 */
	public void packageUser(List<Dispatch> result, List<User> lstUsers)
	        throws DispatchException;

}
